#include "stdlib.h"
#include <stdio.h>

#include "sub.h"

#include <iostream>
#include <vector>
#include <map>

#include <fstream>
#include <iostream>
#include <string>

using namespace std;

int main (int argc, const char* argv[])
{

  string nombrePrograma(argv[0]);
  subtitle *s = NULL;

  if (argc == 3) {
    s = new subtitle(argv[2]);
  }
  else if (argc == 2) {
    s = new subtitle();
    cin >> (*s);
  }
  else {
    cerr <<  "Use: " + nombrePrograma + " [+-]xxx.sss (file.str)?" << endl;
    cerr <<  "xxx is in seconds"<< endl;
    cerr <<  "sss is in miliseconds"<< endl;
    return -1;
  }

  double add = atof(argv[1]);
  
  (*s) += add;  
  cout << (*s) << endl;

  delete s;
    
  return 0;
}
